<?php if (!defined('THINK_PATH')) exit();?>
	<div id="content-header">
		<div id="breadcrumb"> <a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>代理管理</a>
		 <a href="/index.php/Matrix/Drawings/index" form-type='content'>
		 提款订单列表
		 </a> </div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
						<h5>数据列表</h5>
					</div>
					<div class="widget-content ">
						<div class="" style="height: 50px;">
							<div style="float: right;">
								<form action="/index.php/Matrix/Drawings/index" method="post" id="form1">
									<input type="hidden" name="table" value="1" />
									<input type="hidden" name="status" value="<?php echo ($status); ?>" />
									<!-- <input type="hidden" name="classe_id" value="<?php echo (session('classe_id')); ?>" /> --> 审核时间从
									<span style="position: relative;" class="y-datatime">
										<input type="text" data-date="<?php echo date('Y-m-d',time())?>" data-date-format="yyyy-mm-dd" value="" name = 'between_time_start' class="datepicker width_110px" placeholder="选择时间">&nbsp;
									    <a href="#" class="data-del" style="position: absolute;right: 15px;line-height: 30px;display: inline-block;font-size: 18px;"><i class="icon-trash"></i></a>
									</span> 到
									<span style="position: relative;" class="y-datatime">
									<input type="text" data-date="<?php echo date('Y-m-d',time())?>" data-date-format="yyyy-mm-dd" value="" name = 'between_time_end' class="datepicker width_110px" placeholder="选择时间">&nbsp;
									 <a href="#" class="data-del" style="position: absolute;right: 15px;line-height: 30px;display: inline-block;font-size: 18px;"><i class="icon-trash"></i></a>
									</span>
								&nbsp;
									<button class="y_btn yun_search" form-type="form-table"><i class="icon-search icon-white"></i></button>
								</form>
							</div>
						</div>
						<div id="myAlert" class="modal hide" aria-hidden="true" style="display: none;">
							<div class="modal-header">
								<button data-dismiss="modal" class="close" type="button">×</button>
								<h3>批量删除</h3>
							</div>
							<div class="modal-body">
								<p>内容删除之后将不能够恢复，确定要做批量删除吗？</p>
							</div>
							<div class="modal-footer"> <a data-dismiss="modal" class="btn btn-primary data-del-all" href="/index.php/Matrix/Drawings/foreverdelete">确定</a>
								<a data-dismiss="modal" class="btn" href="#">取消</a> </div>
						</div>
						<div id="yun_uploader" class="modal hide close-form-table" aria-hidden="true" style="display: none;">
							<div class="modal-header">
								<button data-dismiss="modal" class="close" type="button">×</button>
								<h3>上传文件</h3>
							</div>
							<div class="modal-body" id="modal-body">
								没有上传文件
							</div>
							<div class="modal-footer">
								<form action="/index.php/Matrix/Drawings/excelImport">
									<button type="submit" class="btn btn-success" form-type="form-table" style="float: right;" close-form-table="close-form-table">确定</button>
									<div class="uploadWallpaperButton" method="post" enctype="multipart/form-data" style="float: right;">
										<input type="file" name="excelData" class="f" id="imgfile" style="display: block;" uniform='none' form-type='uplaoder-modal-body' />
									</div>
								</form>
							</div>
						</div>
						<div id="table">
							
<form class="form-horizontal" method="post" action="/index.php/Matrix/Drawings/batch_summary_list" name="basic_validate" id="basic_validate" novalidate="novalidate">

	<table class="table table-bordered table-striped with-check">
		<thead>
			<tr>
				<th>
					<input type="checkbox" id="title-table-checkbox" name="title-table-checkbox" />
				</th>
				<th width="30px">序号</th>
				<th >申请代理</th>
				<th >申请时间</th>
				<th>提款金额</th>
				<th >开户行</th>
				<th >开户名</th>
				<th >银行卡号</th>
				<th >审核时间</th>
				<th >提款进度</th>
					<th width="170px">操作</th>
			</tr>
		</thead>
		<tbody>
			<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr>
					<td><input type="checkbox" name=checkboxes[] value=<?php echo ($v["drawings_id"]); ?> /></td>
					<td>
						<div class="numerical">
							<?php echo ($key+1); ?>
						</div>
					</td>
					<th ><?php echo ($v["agent_info"]["username"]); ?></th>
					<th ><?php echo (date("Y-m-d H:i:s",$v["created"])); ?></th>
					<td><?php echo ($v["money"]); ?></td>
					<td><?php echo ($v["bank_name"]); ?></td>
					<td><?php echo ($v["account_username"]); ?></td>
					<td><?php echo ($v["account"]); ?></td>
					<?php if($v["review_time"] == 0): ?><th >审核中</th>
					<?php else: ?><th ><?php echo (date("Y-m-d H:i:s",$v["review_time"])); ?></th><?php endif; ?>
					<?php if($v["status"] == 1): ?><th><span style="color:blue">审核中</span></th>
					<td class="center"><a class="btn btn-primary" href="/index.php/Matrix/Drawings/batch_summary?id=<?php echo ($v["drawings_id"]); ?>" form-type='content' onClick="return confirm('确定审核通过?');">审核通过</a></td>
					<?php elseif($v["status"] == 2): ?>
					<th><span style="color:blue">审核通过，待打款</span></th>
					<td class="center"><a class="btn btn-success" href="/index.php/Matrix/Drawings/remit_success?id=<?php echo ($v["drawings_id"]); ?>" form-type='content' onClick="return confirm('确定提款成功?');">提款成功</a>
					<a class="btn btn-info" href="/index.php/Matrix/Drawings/remit_fail?id=<?php echo ($v["drawings_id"]); ?>" form-type='content' onClick="return confirm('确定提款失败?');">提款失败</a></td>
					<?php elseif($v["status"] == 3): ?>
					<th><span style="color:green">提款成功</span></th>
					<th><span style="color:green">操作完成</span></th>
					<?php elseif($v["status"] == 4): ?>
					<th><span style="color:red">提款失败</span></th>
					<td class="center">
					<input type="hidden" id="drawings_back_id" value="<?php echo ($item["drawings_id"]); ?>">
					<a class="btn btn-info" href="/index.php/Matrix/Drawings/back_to_account?id=<?php echo ($v["drawings_id"]); ?>" form-type='content' onClick="return confirm('确定退回余额?');">退回余额</a></td>
					<?php elseif($v["status"] == 5): ?>
					<th><span style="color:red">已退回余额</span></th>
						<th><span style="color:green">操作完成</span></th>
					<?php else: ?>异常<?php endif; ?>
				</tr><?php endforeach; endif; else: echo "" ;endif; ?>
			<tr>
					<td>/</td>
					<td>/</td>
					<th >/</th>
					<th style="color:green;font-size:20px;">所有页面数据合计:</th>
					<th style="color:green;font-size:20px;" ><?php echo ($statistics); ?></th>
					<th >/</th>
					<th >/</th>
					<th >/</th>
					<th >/</th>
					<th >/</th>
					<th >/</th>
				</tr>
		</tbody>
	</table>
	
	<div id="myAlert-bean" class="modal hide" aria-hidden="true" style="display: none;">
		<div class="modal-header">
			<button data-dismiss="modal" class="close" type="button">×</button>
			<h3>删除</h3>
		</div>
		<div class="modal-body">
			<p>内容删除之后将不能够恢复，确定要做删除吗？</p>
		</div>
		<div class="modal-footer"> <a data-dismiss="modal" class="btn btn-primary data-del-bean-alert" href="/index.php/Matrix/Drawings/foreverdelete">确定</a>
			<a data-dismiss="modal" class="btn" href="#">取消</a> </div>
	</div>
	<?php if($v['status'] == 1 ): ?><div>
<button type="submit" class="btn btn-success" form-type="form-content" >批量审核通过</button><?php endif; ?>
</form>
	<!-- page -->
	<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix">
	<div class="" style="float: left;" id="page-left-info">
		<div>当前第 <?php echo ($currentPage); ?> 页/ 共 <?php echo ($totalCount); ?> 条 / 共 <?php echo ($totalPage); ?> 页 跳转到 &nbsp;</div>
		<div>
			<input type="text" class="span2" id ="yun_page_skip_input" value="<?php echo ($currentPage); ?>">
		</div>
		<div><a href='<?php echo ($goPage); ?>&between_time_start=<?php echo ($between_time_start); ?>&between_time_end=<?php echo ($between_time_end); ?>' id = "yun_page_skip" sytle="font-size: 20px;" form-type="page-table"><i class="icon-circle-arrow-right"></i></a></div>
	</div>
	<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
		<?php echo ($page); ?>
	</div>
</div>



						</div>
					</div>
				</div>
			</div>
		</div>
	</div>